FROM ubuntu:bionic

RUN apt-get update && apt-get install -y sl

RUN apt-get install -y git python3 python3-pip virtualenv libopenblas-base liblas-c3
RUN apt-get install -y pdal llvm
RUN git clone https://gitee.com/cthulhu/py3dtiles.git

WORKDIR /py3dtiles

RUN virtualenv -p /usr/bin/python3 venv
RUN . venv/bin/activate
RUN /py3dtiles/venv/bin/pip install -e .
RUN /py3dtiles/venv/bin/python setup.py install
RUN ln -s /py3dtiles/venv/bin/py3dtiles /usr/local/bin

WORKDIR /3ddata

ENTRYPOINT [ "py3dtiles" ]
